package com.ruoyi.insect.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mysql.cj.x.protobuf.MysqlxCrud;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 病虫害识别记录对象 disease_record
 */
public class DiseaseRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 识别结果图片Base64 */
    @Excel(name = "识别结果图片Base64")
    private String resultImage;

    /** 原始图片Base64 */
    @Excel(name = "原始图片Base64")
    private String originalImage;

    /** 主要病虫害名称 */
    @Excel(name = "主要病虫害名称")
    private String mainDisease;

    /** 置信度 */
    @Excel(name = "置信度")
    private BigDecimal confidence;

    /** 识别结果JSON */
    @Excel(name = "识别结果JSON")
    private String predictions;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date recognitionTime;

    private String imageName;

    // getter和setter方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getResultImage() {
        return resultImage;
    }

    public void setResultImage(String resultImage) {
        this.resultImage = resultImage;
    }

    public String getOriginalImage() {
        return originalImage;
    }

    public void setOriginalImage(String originalImage) {
        this.originalImage = originalImage;
    }

    public String getMainDisease() {
        return mainDisease;
    }

    public void setMainDisease(String mainDisease) {
        this.mainDisease = mainDisease;
    }

    public BigDecimal getConfidence() {
        return confidence;
    }

    public void setConfidence(BigDecimal confidence) {
        this.confidence = confidence;
    }

    public String getPredictions() {
        return predictions;
    }

    public void setPredictions(String predictions) {
        this.predictions = predictions;
    }

    public Date getRecognitionTime() {
        return recognitionTime;
    }

    public void setRecognitionTime(Date recognitionTime) {
        this.recognitionTime = recognitionTime;
    }

    public void setImageName(String imageName){
        this.imageName=imageName;
    }

    public String getImageName(){
        return imageName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("resultImage", getResultImage())
                .append("originalImage", getOriginalImage())
                .append("mainDisease", getMainDisease())
                .append("confidence", getConfidence())
                .append("predictions", getPredictions())
                .append("recognitionTime", getRecognitionTime())
                .toString();
    }
}
